<!--************************************************************ -->
<!--* 文件创建日期：2010                                  * -->
<!--* 文件修改日期：			                                   * -->
<!--************************************************************ -->
<!--JSP初始化设置-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.infomanage.po.*" %>
<%@page import="com.infomanage.vo.*" %>
<%@page import="com.infomanage.service.tech.*"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	request.setCharacterEncoding("UTF-8");
	String itemId = request.getParameter("itemId");
    if(itemId == null) itemId = "";
    
    TechSecurityItem item = TechSecurityService.loadTechSecurity(request, response, out);
    int deptId = -1;
    String deptName = "";
    String examinePerson = "";
    String implementPerson = "";
    String participants = "";
    String place = "";
    String planName = "";
    String schematic = "";
    String time = "";
    String timestamp = "";
    String treatDept = "";
    String workSubject = "";
    int xdCommanderId = -1;
    int zdCommanderId = -1;
    String xdCommanderName = "";
    String zdCommanderName = "";
    String actionDetail = "";
    if(item != null) {
    	TechSecurity bean = item.getBean();
    	Department dept = item.getDept();
    	deptName = dept.getPath();
    	Person xdCommander = item.getXdCommander();
    	Person zdCommander = item.getZdCommander();
    	actionDetail = bean.getActionDetail();
    	deptId = bean.getDeptId();
    	examinePerson = bean.getExaminePerson();
    	implementPerson = bean.getImplementPerson();
    	participants = bean.getParticipants();
    	place = bean.getPlace();
    	planName = bean.getPlanName();
    	schematic = bean.getSchematic();
    	time = bean.getTime();
    	timestamp = bean.getTimestamp();
    	treatDept = bean.getTreatDept();
    	workSubject = bean.getWorkSubject();
    	xdCommanderId = bean.getXdCommanderId();
    	zdCommanderId = bean.getZdCommanderId();
    	xdCommanderName = xdCommander.getName();
    	zdCommanderName = zdCommander.getName();
    } 
%>
<html>
<head>
	<title>安全技术工作记录</title>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">	
	<link href="../../css/table.css" rel="stylesheet" type="text/css">
	<link href="../../css/calendar.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../../js/calendar.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript">
	   function init() {
		   if("" != "<%=itemId%>") { // 修改
		   }
	   }
	   // 提交
	   function doSubmit(){
		 	if("" == "<%=itemId%>") {
		 		form1.actionType.value = "add";
			}else {
		 		form1.actionType.value = "modify";
			}
		 	form1.submit();
	   }

	   function showError(error){
		   alert(error);
	   }

	   function showInfo(info){
		   alert(info);
		   window.returnValue = "ok";
		   window.close();
	   }
	   
	   function showLegend(pictureDir){
			var url = encodeURI("security_legend.jsp?pictureDir="+pictureDir);
			var width = '700px';
			var height ='500px';
			var arg = "dialogHeight:" + height + ";dialogWidth:" + width + ";status:no;location:no;edge=sunken;center=yes;resizable=yes;Minimize=yes;Maximize=yes";
			var returnValue = window.showModalDialog(url, "", arg);
			if(returnValue){
				dataFrame.location.reload();
			}
		}
	</script>
</head>
<body  rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0" onclick="clickBody();" onload="init();">
	<input type="hidden" name="itemId" value="<%=itemId%>">
	<input type="hidden" name="actionType">
	<table class="dialogTable" cellpadding="0" cellspacing="0">
		<!-- 表头-->
		<tr class="dialogTableHeader">
			<td>安全技术工作记录</td>
		</tr>
		<!-- 表数据-->
		<tr class="dialogTableContent">
			<td>
				<!-- 数据项 -->
				<table class="dataTable">
					<col width="20%">
					<col width="30%">
					<col width="20%">
					<col width="30%">
					<tr>
						<td class="field">
							小队
						</td>
						<td>
							<%=deptName %>
						</td>
						<td class="field">
							日期
						</td>
						<td>
							<%=timestamp %>
						</td>
					</tr>
					<tr>
						<td class="field">
							时间
						</td>
						<td>
							<%=time %>
						</td>
						<td class="field">
							地点
						</td>
						<td>
							<%=place %>
						</td>
					</tr>
					<tr>
						<td class="field">
							召请单位
						</td>
						<td>
							<%=treatDept %>
						</td>
						<td class="field">
							工作项目
						</td>
						<td>
							<%=workSubject %>
						</td>
					</tr>
					<tr>
						<td class="field">
							参与人数及姓名
						</td>
						<td height="100px" colspan="3">
							<textarea style="width: 100%;height: 100%;background-color:#dfe8f6" readonly><%=participants %></textarea>
						</td>
					</tr>
					<tr>
						<td class="field">
							措施审批人
						</td>
						<td>
							<%=examinePerson %>
						</td>
						<td class="field">
							贯彻人
						</td>
						<td>
							<%=implementPerson %>
						</td>
					</tr>
					<tr>
						<td class="field">
							行动计划名称
						</td>
						<td colspan="3">
							<%=planName %>
						</td>
					</tr>
					<tr>
						<td class="field">
							行动基本情况
						</td>
						<td colspan="3" height="100px">
							<textarea style="width: 100%;height: 100%;background-color:#dfe8f6" readonly><%=actionDetail %></textarea>
						</td>
					</tr>
					<tr>
						<td class="field">
							示意图
						</td>
						<td colspan="3" height="120px" valign="middle">
							<a id="legend"  href="#" onclick="showLegend('<%=schematic %>');">查看图片</a>
						</td>
					</tr>
					<tr>
						<td class="field">
							中队指挥员
						</td>
						<td>
							<%=zdCommanderName %>
						</td>
						<td class="field">
							小队指挥员
						</td>
						<td>
							<%=xdCommanderName %>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td  class="tableBtn">
				<span onclick="window.print();">打印</span>			
				<span onclick="window.close();">关闭</span>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="2">
				&nbsp;
			</td>
		</tr>
	</table>
	<iframe src="#" frameborder="0" id="treeFrame" name="frame" style="display: none;position: absolute;"></iframe>
	<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</body>
</html>